package cn.powertime.evaluation.mapper;

import cn.powertime.evaluation.entity.CpsAutomatic;
import cn.powertime.evaluation.vo.RespAnswerTestPaperVo;
import cn.powertime.evaluation.vo.RespAnswerTopicListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户智能练习表 Mapper 接口
 * </p>
 *
 * @author liqi
 * @since 2019-09-23
 */
public interface CpsAutomaticMapper extends BaseMapper<CpsAutomatic> {

    /**
     * 已答试卷
     *
     * @param page   分页参数
     * @param userId 用户id
     * @return Page
     */
    Page<RespAnswerTestPaperVo> selectAnswerRecordPage(Page page, @Param("userId") Long userId);

    /**
     * 查看试卷
     *
     * @param userId      用户id
     * @param testPaperId 试卷id
     * @return List
     */
    List<RespAnswerTopicListVo> selectTestPaperView(@Param("userId") Long userId, @Param("testPaperId") Long testPaperId);

}
